package mtest.day2;

public class Demo4 {
    public static void main(String[] args) {
        /*
        A = 0011 1100
        B = 0000 1101
        --------------
        A&B = 0000 1100
        A|B = 0011 1101
        A^B = 0011 0001
        ~B = 1111 0010
        2*8 = 16 2*2*2*2
        <<  *2
        >>  /2
         */
        System.out.println(2 >> 22);
        System.out.println(2 << 3);

        int a = 10;
        int b = 20;
        a += b; //a = a+b
        System.out.println(a); //30

        // 字符串连接符
        System.out.println("------------------");
        //  字符串在后面会先运算
        System.out.println(a + b + ""); //50
        // 字符串在前面会拼接，
        System.out.println("" + a + b); //3020
    }
}
